<template>
	<view>
		<view class="details">
			<view>
				<text>{{content}}</text>
			</view>
			<!-- <textarea class="textarea" maxlength="2000" placeholder="请输入审核意见"></textarea> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content:'',
				messageId:[],
			}
		},
		onLoad: function(option) { //option为object类型，会序列化上个页面传递的参数
			console.log(option.messageId,option.content)
			this.content = option.content
			this.messageId[0]=option.messageId
			this.informationDetails()
		},
		onBackPress() {
			uni.$emit("planAdd",{messageId:this.messageId,returnValue:true});
			uni.redirectTo({
			    url: '/pages/news/index'
			});
		    },
		methods: {
			async informationDetails() {
				console.log(this.messageId)
				const res = await this.$myRequest({
					url: '/api-msg/messages/read',
					method: "post",
					data: this.messageId,
				})
				if (res.success == true) {
					console.log(res,this.content,this.messageId)
					uni.$emit("planAdd",{messageId:this.messageId,hide:false});
				}
			},
		}
	}
</script>

<style lang="scss">
	.details{
		width: 90%;
		background-color: #FFFFFF;
		margin: 40rpx auto 0 auto;
		font-size: 35rpx;
		color: #000000;
		border-radius: 10rpx;
		view{
			margin: 0 auto;
			width: 90%;
			padding: 20rpx 0 20rpx 20rpx;
		}
	}

</style>
